import view.LoginFrame;
import javax.swing.*;

public class Main {
    public static void main(String[] args) {

        // 设置界面风格为系统默认风格
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }
        
        // 使用 SwingUtilities.invokeLater 确保在 EDT 线程中创建和显示 GUI
        SwingUtilities.invokeLater(() -> {
            try {

                LoginFrame loginFrame = new LoginFrame();
                loginFrame.setVisible(true);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null,
                    "启动失败：" + e.getMessage(),
                    "错误",
                    JOptionPane.ERROR_MESSAGE);
                e.printStackTrace();
            }
        });
    }
} 